package preprocessor.absorption.extended;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Set;

import entities.axiom.ConceptAxiom;

import kb.DescriptionLogicsKB;
import utils.exception.TypeException;
import utils.io.KBAccess;

/**
 * @deprecated
 * @author j55wu
 * 
 */
public class TestAxiomGraph {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String fileloc = "testkb.kb";
		DescriptionLogicsKB kb = null;
		try {
			FileReader fr = new FileReader(fileloc);
			BufferedReader br = new BufferedReader(fr);
			kb = KBAccess.processKBFile(
					br,
					false,
					fileloc.substring(fileloc.lastIndexOf('/') + 1,
							fileloc.lastIndexOf('.')));
		} catch (Exception e) {
			e.printStackTrace();
		}
		Set<ConceptAxiom> axs = kb.getTbox().getOriginalTBoxAxioms();
		AxiomGraph ag = new AxiomGraph(axs);
		try {
			ag.computeRealtedness();
		} catch (TypeException e) {
			e.printStackTrace();
		}
		System.out.println(ag.getAllComponents());
	}

}
